﻿using UnityEngine;
using System.Collections;

public class DisconnectTip : MonoBehaviour {
    //

    public GameObject btn;
    public bool isDestory = true;
	// Use this for initialization
	void Start ()
	{
        //
	    EventTriggerListener.Get(btn).onClick = OnBtn;
        //
        
	}


    public void OnBtn(GameObject obj)
    {
        //点击返回
        //gameObject.SetActive(false);
        if (isDestory)
        {
            GameObject.DestroyImmediate(gameObject);

        }
        else
        {
            gameObject.SetActive(false);
        }
        //
    }
	
	// Update is called once per frame
	void Update () {
	
	}
}
